﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using YAF.Core;
using YAF.Types.Interfaces;
using YAF.Types.EventProxies;

public partial class admin_Logout : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Cookies["texchange"] != null)
        {
            HttpCookie c = new HttpCookie("texchange");
            c.Expires = DateTime.Now.AddDays(-1d);
            Response.Cookies.Add(c);
        }
        ForumPage currentPage = new ForumPageRegistered();
        YafContext PageContext = currentPage.PageContext;
        FormsAuthentication.SignOut();
        currentPage.Get<IRaiseEvent>().Raise(new UserLogoutEvent(PageContext.PageUserID));
		Response.Redirect("~/admin/Default.aspx");
    }
}
